/*
 * @Description:
 * @Autor: 刘诗文
 * @Date: 2020-11-10 09:44:23
 * @LastEditors: 刘诗文
 * @LastEditTime: 2020-12-30 10:46:53
 */
import axios from '@/api/fetch';
// import * as types from './types';
import SERVER from '@/api/server';

// 查询销售回访分派信息
export const getAfterVisitInfo = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/customerCare/salesReturnManagement/getAfterVisitInfo`, { params });

// 查询销售回访录入信息
// export const getVisitInfo = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customerCare/entryVisitResult/getEntryVisitResult`, { params });
export const getVisitInfo = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/sales/returnVisit/findAll`, { params });

// 保存销售回访录入信息
export const saveVisitInfo = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/sales/returnVisit/save`, params);

// 查询销售回访结果信息
export const getVisitResultQuery = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customerCare/entryVisitResult/getVisitResultQuery`, { params });

// 问卷名称下拉框
export const getQuestionnaireList = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customerCare/entryVisitResult/getQuestionnaireList`, { params });

// 操作员、录入人
export const getAllUser = params => axios.get(`${SERVER.DMSCLOUD_BASEDATA}/basedata/users/getDealerUser`);

// 销售回访-任务分派
export const taskAssignment = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customerCare/entryVisitResult/taskAssignment`, params);

/* 获取未分配销售回访信息 */
export const getSaleVisitInfo = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customerCare/visitAllocation/getSaleVisitInfo`, { params });
